package com.dmai.capacity.platform.common.exception;

import com.dmai.capacity.platform.common.constant.CommonConstant;

/**
 * 业务异常
 */
public class BusinessException extends RuntimeException {
    private static final long serialVersionUID = 6610083281801529147L;

    private Integer code;
    private String message;

    public BusinessException(String message) {
        super(message);
        this.code = CommonConstant.FAIL;
        this.message = message;
    }

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }


    public Integer getCode() {
        return code;
    }

    public String getErrorMsg() {
        return message;
    }
}
